/****************************************************************
 *
 * Project: Handle ARM M4 STM32F407VG In 2 Weeks
 * 
 ****************************************************************/

/****************************************************************
 *
 *	Module		: "header file" myString.h
 *  Tool		: KeilC ARM 4.22a
 *	Chip		: STM32F407VG
 * 	History		: 9/12/2011
 *	Description	: Day 7
				  + My library to play with string type
				  + Reference to header file "myString.c"
 *				
 *	Author		: Dang Anh Tung			
 *	Description	: www.payitforward.edu.vn
 *				
 *
 ****************************************************************/

 
 /****************************************************************
 * 							IMPORT
 ****************************************************************/
 #include "stm32f4xx.h"
 #include "mydef.h"


 /*****************************************************************
 * 							DEFINE
 ******************************************************************/
 


 /****************************************************************
 * 							GLOBAL
 ****************************************************************/


 /****************************************************************
 * 						   FUNCTIONS
 ****************************************************************/


//copy content from Source_String to Destination String, with length & begin at offset
void myStrCopy(char *pSourceStr,char *pDestStr,uint32_t offset, uint32_t length);

//compare content of 2 string: return TRUE if all pair of member is equal
uint32_t myStrCompare( char *pStr1, char *pStr2, uint32_t length);

//Combine 2 string together	  str = [Str1][Str2]
void myStrCombine(char *pStrHeader,uint32_t lengthHeader, char *pStrFooter, uint32_t lengthFooter, char *pStrResult);

void myInt2Str(int32_t i, uint8_t *pStr, uint32_t iLen);
void myReal2Str(REAL r, uint8_t *pStr, uint32_t iLen, uint32_t fLen);
void myStr2Real(uint8_t * pStr, uint32_t sLen, REAL *r);


